home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / borland / svgabg52.zip / TWK256.INC < prev    next >
Text File  |  1992-06-25  |  899b  |  38 lines

  1. (************************************************)
  2. (*                         *)
  3. (*      Tweaked 256 BGI driver defines    *)
  4. (*        Copyright (c) 1991        *)
  5. (*        Jordan Hargraphix Software        *)
  6. (*                        *)
  7. (************************************************)
  8.  
  9. type DacPalette256 = array[0..255] of array[0..2] of Byte;
  10.  
  11. (* These are the currently supported modes *)
  12. const
  13.   TWK320x400x256    = 0;
  14.   TWK320x480x256    = 1;
  15.   TWK360x480x256    = 2;
  16.   TWK376x564x256    = 3;
  17.   TWK400x564x256    = 4;
  18.   TWK400x600x256    = 5;
  19.   TWK320x240x256    = 6;
  20.  
  21. (* Setvgapalette sets the entire 256 color palette *)
  22. (* PalBuf contains RGB values for all 256 colors   *)
  23. (* R,G,B values range from 0 to 63               *)
  24. procedure SetVGAPalette256(PalBuf : DacPalette256);
  25. var
  26.   Reg : Registers;
  27.  
  28. begin
  29.   reg.ax := $1012;
  30.   reg.bx := 0;
  31.   reg.cx := 256;
  32.   reg.es := Seg(PalBuf);
  33.   reg.dx := Ofs(PalBuf);
  34.   intr($10,reg);
  35. end;
  36.  
  37.  
  38.